﻿using DimensionsHelper.Client.Helpers;
using DimensionsHelper.Common.Contracts.Excel;

namespace DimensionsHelper.Client;

internal static class StaticSelections
{
    public static readonly string[] InsertOrReplace =
    [
        "插入",
        "替换"
    ];


    public static readonly string[] CsvReplaceModes = ["按索引", "按位置"];

    public static string[] ReportLevels => EnumStringCache.ReportLevels;


    public static BorderStyle[] BorderStyleValues { get; } =
    [
        BorderStyle.None,
        BorderStyle.Hair,
        BorderStyle.Dotted,
        BorderStyle.DashDot,
        BorderStyle.Thin,
        BorderStyle.DashDotDot,
        BorderStyle.Double,
        BorderStyle.MediumDashDotDot,
        BorderStyle.MediumDashed,
        BorderStyle.MediumDashDot,
        BorderStyle.Thick,
        BorderStyle.Medium,
        BorderStyle.Double
    ];
}


internal static class ServiceKeys
{
    public const string Replacement = "Replacement";
    public const string Table = "Table";
}


internal static class ProjectInformation
{
    public const string PositiveInteger = "正整数";
    public const string NotEmptyAndUnique = "不为空且唯一";

    public const string Done = "已完成。";

    public const string ProjectIsInitializing = "程序初始化中 ...";
    public const string ProjectIsInitialized = "程序初始化完成。";
    public const string ProjectIsStarting = "程序开始启动 ...";
    public const string ProjectIsFinished = "程序已结束。";
    public const string ProjectIsCancelled = "项目已取消。";
    public const string ProjectSpentTime = "程序用时：{0}";

    public const string JsonExportFinished = "JSON文件已导出：{0}";
}


internal static class ProjectErrorMessages
{
    public const string ProjectIsNotConfig = "未添加项目配置。";
    public const string ProjectExportPathIsNotConfig = "未配置项目输出路径。";
    public const string ProjectExportConfigIsEmpty = "未添加项目输出配置。";

    public const string ProjectInputFileIsNotSelected = "未选择项目输入文件。";
    public const string ProjectExportFileIsNotSelected = "未选择项目输出文件。";

    public const string ProjectOptionsInitializeFailed = "项目配置初始化失败。";

    public const string FileIsNotExist = "文件'{0}'不存在。";
    public const string FileIsNotExistMessage = "文件'{0}'不存在，{1}。";
    public const string FileIsExist = "文件'{0}'已存在。";
    public const string JsonFileIsNotConfig = "JSON文件路径未配置。";
    public const string JsonFileLoadFailed = "JSON文件'{0}'读取失败。";
    public const string JsonFileDeserializeFailed = "JSON文件'{0}'反序列化失败，错误：{1}";
    public const string JsonSerializeFailed = "JSON文件'{0}'序列化失败。";

    public const string PropertyCollectionIsEmpty = "配置属性'{0}'集合为空。";
    public const string PropertyCannotIgnore = "配置属性'{0}'不可忽略。";
    public const string PropertyValueIsInvalid = "配置属性'{0}'值无效，需要{1}。";
    public const string PropertyCannotIgnoreAndNeedEnsureExist = "配置属性'{0}'值不可忽略，并且需要确保在'{1}'添加了同名配置。";

    public const string NamedObjectConflict = "名为'{0}'的{1}配置已存在，重复的将被忽略。";
    public const string UnFoundNamedObject = "未找到名为'{0}'的{1}配置。";

    public const string TypeIsNotFit = "类型不符合，需要'{0}'。";
    public const string ConvertFailure = "无法将值'{0}'转换为类型'{1}'。";

    public const string SigTestExpressionIsInvalid = "列显著性表达式'{0}'无效。";
    public const string SigTestExpressionIsInvalidMessage = "列显著性表达式'{0}'无效，{1}。";
    public const string SigTestExpressionIsInvalidWithName = "名为'{0}'的列显著性表达式'{1}'无效。";
    public const string SigTestExpressionIsTooShort = "列显著性表达式'{0}'无效：长度过短，至少有两个字母。";
    public const string SigTestExpressionIsExist = "列显著性表达式'{0}'已存在，不能重复配置。";
}